package org.itboys.member.entity;

import org.itboys.mongodb.entity.BaseLongIdEntity;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;
import org.mongodb.morphia.utils.IndexDirection;

/**
 * 会员登入日志
 * @author 王架构
 *
 */
@Entity(value = "MemberLogin", noClassnameStored = true)
public class MemberLogin  extends BaseLongIdEntity{

	private static final long serialVersionUID = 7251419886875656222L;
	
	@Indexed
	private long memberId;
	@Indexed(value = IndexDirection.DESC)
	private long loginTime; //登入时间
	private String ip; //登入IP
	private String loginFrom;//web 微信 android ios 等登入的
	@Indexed
	private String deviceId;//登入的设备号
	
	public long getMemberId() {
		return memberId;
	}
	public void setMemberId(long memberId) {
		this.memberId = memberId;
	}
	public long getLoginTime() {
		return loginTime;
	}
	public void setLoginTime(long loginTime) {
		this.loginTime = loginTime;
	}
	public String getLoginFrom() {
		return loginFrom;
	}
	public void setLoginFrom(String loginFrom) {
		this.loginFrom = loginFrom;
	}
	public String getDeviceId() {
		return deviceId;
	}
	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
}
